home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 4 / The Arsenal Files 4 (Arsenal Computer).ISO / ham / sattrk31.tgz / sattrack-3.1.tar / SatTrack / src / include / sattrack.h < prev    next >
C/C++ Source or Header  |  1995-03-28  |  33KB  |  595 lines

  1. /******************************************************************************/
  2. /*                                                                            */
  3. /*  Title       : sattrack.h                                                  */
  4. /*  Author      : Manfred Bester                                              */
  5. /*  Date        : 24Feb92                                                     */
  6. /*  Last change : 15Mar95                                                     */
  7. /*                                                                            */
  8. /*  Synopsis    : Definitions of constants and parameters for 'sattrack'      */
  9. /*                and other related programs.                                 */
  10. /*                                                                            */
  11. /*                                                                            */
  12. /*  SatTrack is Copyright (c) 1992, 1993, 1994, 1995 by Manfred Bester.       */
  13. /*  All Rights Reserved.                                                      */
  14. /*                                                                            */
  15. /*  Permission to use, copy, and distribute SatTrack and its documentation    */
  16. /*  in its entirety for educational, research and non-profit purposes,        */
  17. /*  without fee, and without a written agreement is hereby granted, provided  */
  18. /*  that the above copyright notice and the following three paragraphs appear */
  19. /*  in all copies. SatTrack may be modified for personal purposes, but        */
  20. /*  modified versions may NOT be distributed without prior consent of the     */
  21. /*  author.                                                                   */
  22. /*                                                                            */
  23. /*  Permission to incorporate this software into commercial products may be   */
  24. /*  obtained from the author, Dr. Manfred Bester, 1636 M. L. King Jr. Way,    */
  25. /*  Berkeley, CA 94709, USA. Note that distributing SatTrack 'bundled' in     */
  26. /*  with ANY product is considered to be a 'commercial purpose'.              */
  27. /*                                                                            */
  28. /*  IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, */
  29. /*  SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF   */
  30. /*  THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE AUTHOR HAS BEEN ADVISED  */
  31. /*  OF THE POSSIBILITY OF SUCH DAMAGE.                                        */
  32. /*                                                                            */
  33. /*  THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT      */
  34. /*  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A   */
  35. /*  PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS"      */
  36. /*  BASIS, AND THE AUTHOR HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, */
  37. /*  UPDATES, ENHANCEMENTS, OR MODIFICATIONS.                                  */
  38. /*                                                                            */
  39. /******************************************************************************/
  40.  
  41. #ifdef  TRUE
  42. #undef  TRUE
  43. #endif
  44.  
  45. #ifdef  FALSE
  46. #undef  FALSE
  47. #endif
  48.  
  49. #define TRUE                 -1
  50. #define FALSE                 0
  51.  
  52. /******************************************************************************/
  53. /*                                                                            */
  54. /* character strings                                                          */
  55. /*                                                                            */
  56. /******************************************************************************/
  57.  
  58. #define SATDIR                "/usr1/manfred"    /* directory where SatTrack  */
  59.                                                  /* lives; used if HOMEDIR is */
  60.                                                  /* undefined in the Makefile */
  61.  
  62. #define DATA                  "SatTrack/data"    /* SatTrack sub-directories  */
  63. #define PRED                  "SatTrack/pred"
  64. #define RUN                   "SatTrack/run"
  65. #define TLE                   "SatTrack/tle"
  66. #define SRC                   "SatTrack/src"
  67. #define INC                   "SatTrack/src/include"
  68.  
  69. #define CITIES                "cities.dat"       /* resource file names       */
  70. #define DEFAULTS              "defaults0.dat"
  71. #define MODES                 "modes.dat"
  72. #define TLEX                  "tlex.dat"
  73.  
  74. #define REGMAIL               "manfred@ssl.berkeley.edu"
  75.  
  76. /******************************************************************************/
  77. /*                                                                            */
  78. /* default parameters                                                         */
  79. /* (these will be used if they are not specified in defaults.dat)             */
  80. /*                                                                            */
  81. /******************************************************************************/
  82.  
  83. #define DEFSITE               "South Pole"     /* default ground station      */
  84. #define DEFCALLSIGN           "DL5KR"          /* default station callsign    */
  85. #define DEFSAT                "16609"          /* default satellite (Mir)     */
  86. #define DEFSETTLE             "tlex.dat"       /* default tle set             */
  87. #define DEFSETSTS             "sts.dat"        /* default tle set STS         */
  88. #define DEFSETTYPE            "NASA"           /* default tle set type        */
  89. #define DEFSATGROUP           "am"             /* default satellite group     */
  90. #define DEFDISPTYPE           "M"              /* default live display type   */
  91. #define DEFTIMEZONE           "UTC"            /* default time zone           */
  92. #define DEFXTERM              "xterm"          /* default X terminal type     */
  93. #define DEFANTENNADEV         "/dev/null"      /* default antenna interface   */
  94. #define DEFRADIODEVA          "/dev/null"      /* default radio interface A   */
  95. #define DEFRADIODEVB          "/dev/null"      /* default radio interface B   */
  96.  
  97. #define DEFDURATION           6.0              /* default duration            */
  98. #define DEFMINELEVATION       0.0              /* default minimum elevation   */
  99. #define DEFTRACKINGFLAG       0                /* default tracking flag       */
  100. #define DEFDISPLINES          24               /* number of lines on display  */
  101. #define DEFXDISPLINES         64               /* number of lines on Xdisplay */
  102. #define DEFATMPRESS           760.0            /* standard atm. press. [mmHg] */
  103. #define DEFAMBTEMP            15.0             /* standard amb. temp.  [C]    */
  104. #define DEFRELHUMID           30.0             /* standard rel. humidity [%]  */
  105.  
  106. /******************************************************************************/
  107. /*                                                                            */
  108. /* header of NORAD two-line Keplerian element sets                            */
  109. /* (not used in 'sattrack' but in the auxiliary programs)                     */
  110. /*                                                                            */
  111. /******************************************************************************/
  112.  
  113. #define TLEHEADER             "- Current Two-Line Element Sets "
  114.  
  115. /******************************************************************************/
  116. /*                                                                            */
  117. /* control flags and character strings for different propagation models       */
  118. /*                                                                            */
  119. /******************************************************************************/
  120.  
  121. #define TLEMEAN               0
  122. #define LOWEARTH              1
  123. #define DEEPSPACE             2
  124.  
  125. #define TLEMEANMODEL          "TLE Mean"
  126. #define LOWEARTHMODEL         "SGP4"
  127. #define DEEPSPACEMODEL        "SDP4"
  128.  
  129. /******************************************************************************/
  130. /*                                                                            */
  131. /* command line arguments passed to the main program                          */
  132. /*                                                                            */
  133. /******************************************************************************/
  134.  
  135. #define BATCH                 "-B"
  136. #define DEBUG                 "-D"
  137. #define DEFFILE               "-F"
  138. #define GRAPH                 "-G"
  139. #define MODEL                 "-M"
  140. #define QUICK                 "-Q"
  141. #define TIMEZONE              "-T"
  142. #define VERBOSE               "-V"
  143.  
  144. /******************************************************************************/
  145. /*                                                                            */
  146. /* batch mode command line parameters                                         */
  147. /*                                                                            */
  148. /******************************************************************************/
  149.  
  150. #define NASA                  "NASA"
  151. #define NORAD                 "NORAD"
  152. #define SHORTPR               "SHORTPR"
  153. #define LONGPR                "LONGPR"
  154. #define TRANSIT               "TRANSIT"
  155. #define NOW                   "NOW"
  156. #define AUTO                  "AUTO"
  157. #define HARDCOPY              "HARDCOPY"
  158.  
  159. /******************************************************************************/
  160. /*                                                                            */
  161. /* menu selection parameters                                                  */
  162. /*                                                                            */
  163. /******************************************************************************/
  164.  
  165. #define DX                    "D"
  166. #define FX                    "F"
  167. #define LX                    "L"
  168. #define MX                    "M"
  169. #define PX                    "P"
  170. #define QX                    "Q"
  171. #define RX                    "R"
  172. #define SX                    "S"
  173. #define TX                    "T"
  174. #define VX                    "V"
  175. #define YES                   "Y"
  176. #define NO                    "N"
  177.  
  178. #define START                 0
  179. #define DISPLAY               1
  180. #define SINGLESAT             2
  181. #define MULTISAT              3
  182. #define PREDICT               4
  183. #define TEST                  5
  184. #define RESTART               6
  185.  
  186. #define QUIT                  997
  187. #define EXIT                  998
  188. #define VOID                  999
  189.  
  190. /******************************************************************************/
  191. /*                                                                            */
  192. /* live display widths                                                        */
  193. /*                                                                            */
  194. /******************************************************************************/
  195.  
  196. #define DISPCOLUMNS           80               /* number of columns on disp   */
  197. #define XDISPCOLUMNS          132              /* number of columns on Xdisp  */
  198.  
  199. /******************************************************************************/
  200. /*                                                                            */
  201. /* control flags for single and multisat live displays                        */
  202. /*                                                                            */
  203. /******************************************************************************/
  204.  
  205. #define ERROR                -1
  206. #define OFF                   0
  207. #define ON                    1
  208. #define LIST                  2
  209. #define ORDER                 3
  210. #define ELEV                  4
  211. #define NAME                  5
  212. #define OBJNUM                6
  213. #define MANTRK                7
  214. #define AUTOTRK               8
  215. #define SELECT                9
  216. #define MARK                  10
  217.  
  218. /******************************************************************************/
  219. /*                                                                            */
  220. /* satellite types                                                            */
  221. /*                                                                            */
  222. /******************************************************************************/
  223.  
  224. #define BASIC                 0
  225. #define STS                   1
  226. #define MIR                   2
  227. #define FREEDOM               3
  228. #define HST                   4
  229.  
  230. /******************************************************************************/
  231. /*                                                                            */
  232. /* antenna controller and radio types                                         */
  233. /*                                                                            */
  234. /* these are used to select the proper control sequences in 'satctrl.c' and   */
  235. /* for the ISI telescopes in 'sattele.c'                                      */
  236. /*                                                                            */
  237. /* THE USER NEEDS TO SPECIFY THE ANTENNATYPE AND THE RADIOTYPE BELOW AS ONE   */
  238. /* OF THE OPTIONS FORM THE LIST OF ANTENNA TYPES AND RADIO TYPES. MORE CAN    */
  239. /* BE ADDED IF NEEDED                                                         */
  240. /*                                                                            */
  241. /******************************************************************************/
  242.  
  243. #define NONE                 -1
  244. #define GENERIC               0
  245.  
  246. #define ISITELESCOPE          1
  247. #define KANSASCITY            2
  248. #define TRAKBOX               3
  249.  
  250. #define FT736                 1
  251. #define IC970                 2
  252. #define TS790                 3
  253. #define DUAL                  4
  254.  
  255. #ifdef ISI
  256. #define ANTENNATYPE           ISITELESCOPE
  257. #define RADIOTYPE             NONE
  258. #else
  259. #define ANTENNATYPE           TRAKBOX        /* <- USER NEEDS TO SPECIFY THIS */
  260. #define RADIOTYPE             NONE           /* <- USER NEEDS TO SPECIFY THIS */
  261. #endif
  262.  
  263. /******************************************************************************/
  264. /*                                                                            */
  265. /* printer options                                                            */
  266. /*                                                                            */
  267. /******************************************************************************/
  268.  
  269. #define PRINTCMD              "enscript"
  270. #define PRINTOPT              "-f"
  271. #define FONT                  "Courier"
  272. #define SIZE9                 "9"
  273. #define SIZE10                "10"
  274. #define SIZE12                "12"
  275.  
  276. /******************************************************************************/
  277. /*                                                                            */
  278. /* math functions                                                             */
  279. /*                                                                            */
  280. /******************************************************************************/
  281.  
  282. #define SQR(x)                ((x)*(x))
  283.  
  284. /******************************************************************************/
  285. /*                                                                            */
  286. /* general numerical constants                                                */
  287. /*                                                                            */
  288. /******************************************************************************/
  289.  
  290. #define ZERO                  0.0
  291. #define ONEPPB                1.0e-9
  292. #define ONEPPM                1.0e-6
  293. #define TWOPPM                2.0e-6
  294. #define ONETHIRD              (1.0/3.0)
  295. #define TWOTHIRDS             (2.0/3.0)
  296. #define THREEHALFS            (3.0/2.0)
  297. #define ONE                   1.0
  298. #define ONEMEG                1.0e6
  299. #define TWOMEG                2.0e6
  300.  
  301. /******************************************************************************/
  302. /*                                                                            */
  303. /* numerical constants for unit conversions                                   */
  304. /*                                                                            */
  305. /******************************************************************************/
  306.  
  307. #ifdef  PI
  308. #undef  PI
  309. #endif
  310.  
  311. #ifdef  TWOPI
  312. #undef  TWOPI
  313. #endif
  314.  
  315. #define PI                    3.14159265358979323846264338
  316. #define TWOPI                 (2.0*PI)
  317. #define FOURPI                (4.0*PI)
  318. #define HALFPI                (0.5*PI)
  319. #define THREEHALFPI           (1.5*PI)
  320.  
  321. #define CRH                   (24.0/TWOPI)         /* convert rad into hours  */
  322. #define CRS                   (86400.0/TWOPI)      /* convert rad into sec    */
  323. #define CRD                   (360.0/TWOPI)        /* convert rad into deg    */
  324. #define CRAM                  (21600.0/TWOPI)      /* convert rad into arcmin */
  325. #define CRAS                  (1296000.0/TWOPI)    /* convert rad into arcsec */
  326. #define CDR                   (TWOPI/360.0)        /* convert deg into rad    */
  327. #define CAMR                  (TWOPI/21600.0)      /* convert arcmin into rad */
  328. #define CASR                  (TWOPI/1296000.0)    /* convert arcsec into rad */
  329. #define CRREV                 (1.0/TWOPI)          /* convert rad into rev    */
  330.  
  331. #define HALFDEG               (0.5*CDR)            /* half a deg [rad]        */
  332.  
  333. #define MPD                   1440.0               /* minutes per day         */
  334. #define MPD2                  (MPD*MPD)            /* (minutes per day)^2     */
  335. #define MPD3                  (MPD2*MPD)           /* (minutes per day)^3     */
  336. #define SPD                   86400.0              /* seconds per day         */
  337.  
  338. #define CKMM                  1000.0               /* convert km to m         */
  339. #define CMKM                  1.0e-3               /* convert m to km         */
  340. #define CKMNM                 0.539956804          /* convert km to naut. mil.*/
  341. #define CHZKHZ                1.0e-3               /* convert Hz to kHz       */
  342. #define CKHZMHZ               1.0e-3               /* convert kHz to MHz      */
  343. #define CHZMHZ                1.0e-6               /* convert Hz to MHz       */
  344. #define CKHZHZ                1.0e+3               /* convert kHz to Hz       */
  345. #define CMHZHZ                1.0e+6               /* convert MHz to Hz       */
  346.  
  347. /******************************************************************************/
  348. /*                                                                            */
  349. /* numerical constants describing the Earth's orbit and figure                */
  350. /*                                                                            */
  351. /* EARTHRADIUS and EARTHFLAT are from: "Astronomical Almanac", 1991, p. K13   */
  352. /*                                                                            */
  353. /******************************************************************************/
  354.  
  355. #define EARTHSMA              149597892.0          /* 1 AU [km]               */
  356. #define EARTHRADIUS           6378.137             /* equatorial radius [km]  */
  357. #define EARTHECCEN            0.01675104           /* Earth's orbit eccentr.  */
  358. #define EARTHFLAT             (1.0/298.257222)     /* geoid model parameters  */
  359.  
  360. /******************************************************************************/
  361. /*                                                                            */
  362. /* numerical constants describing the apparent size of the Sun and the        */
  363. /* proximity limit for calculating transits across the solar disk             */
  364. /*                                                                            */
  365. /******************************************************************************/
  366.  
  367. #define SUNRADIUS             695980.0             /* equatorial radius [km]  */
  368. #define SUNDISKRAD            (16.0*CAMR)          /* Sun disk radius [rad]   */
  369. #define SUNPROX               48.0                 /* Sun prox limit [arcmin] */
  370.  
  371. /******************************************************************************/
  372. /*                                                                            */
  373. /* numerical constants describing the motions within the solar system         */
  374. /*                                                                            */
  375. /******************************************************************************/
  376.  
  377. #define JULCENT               36525.0              /* mean solar days / jcy   */
  378. #define TROPCENT              36524.219879         /* mean solar days / cy    */
  379. #define TROPYEAR              (TROPCENT/100.0)     /* mean solar days / year  */
  380. #define JULDAT1900            2415020.0            /* Julian date of 1900.0   */
  381. #define JULDAT1950            2433282.423          /* Julian date of 1950.0   */
  382. #define JULDAT2000            2451545.0            /* Julian date of 2000.0   */
  383. #define SIDSOLAR              1.002737909350       /* sidereal rotation rate  */
  384. #define SIDRATE               (TWOPI/SPD*SIDSOLAR) /* [rad/s]                 */
  385.  
  386. /******************************************************************************/
  387. /*                                                                            */
  388. /* physical constants                                                         */
  389. /*                                                                            */
  390. /* GM (and KEPLER) are from: "Astronomical Almanac", 1991, p. K13             */
  391. /*                                                                            */
  392. /******************************************************************************/
  393.  
  394. #define CVAC                  2.99792458e5         /* speed of light [km/s]   */
  395.  
  396. #define GM                    398600.5000          /* [km^3/s^2]              */
  397. #define GMSGP                 398600.7995          /* value used in SGP model */
  398.  
  399. #define KEPLER                42241.09773          /* GM^(1/3)*(SPD/2PI)^(2/3)*/
  400. #define KEPLERSGP             42241.10831          /* value used in SGP model */
  401.                                                    /* with a [km] and T [min] */
  402.  
  403. /******************************************************************************/
  404. /*                                                                            */
  405. /* atmospheric parameters used for calculation of refraction                  */
  406. /*                                                                            */
  407. /******************************************************************************/
  408.  
  409. #define SCALEHEIGHT           8.0              /* atmosph. scale height [km]  */
  410. #define WAVEL                 0.550            /* wavelength of observ. [um]  */
  411. #define REFWAVEL              0.550            /* reference wavelength [um]   */
  412.  
  413. /******************************************************************************/
  414. /*                                                                            */
  415. /* satellite parameters                                                       */
  416. /*                                                                            */
  417. /******************************************************************************/
  418.  
  419. #define DOWNLINKFREQ          146.0            /* default downlink freq [MHz] */
  420. #define UPLINKFREQ            0.0              /* default uplink freq   [MHz] */
  421. #define FREQSTEP              100.0            /* default tuning step   [Hz]  */
  422.  
  423. #define MAXPHASE              256.0            /* max. value for phase number */
  424.  
  425. #define MAXFREQS              10               /* max. number sat frequencies */
  426. #define MAXMODES              10               /* max. number sat modes       */
  427.  
  428. #define MAXCITIES             850              /* max. number of cities       */
  429. #define MAXSATS               600              /* max. number of satellites   */
  430. #define MAXSTATIONS           10               /* max. number of gnd stations */
  431. #define MAXTDRS               5                /* max. number of TDRS sats    */
  432.  
  433. #define MAXCITYLEN            37               /* max. length of city name    */
  434. #define MAXSATNAMELEN         14               /* max. length of sat name     */
  435.  
  436. /******************************************************************************/
  437. /*                                                                            */
  438. /* satellite eclipse parameters                                               */
  439. /*                                                                            */
  440. /******************************************************************************/
  441.  
  442. #define SAT                   0                /* code for calculation of     */
  443. #define SUN                   1                /* azimuth and elevation       */
  444. #define MOON                  2
  445.  
  446. #define DAY                   0                /* code for display of eclipse */
  447. #define PARTIAL               1                /* conditions                  */
  448. #define NIGHT                 2
  449. #define VISIBLE               3
  450. #define BLANK                 4
  451.  
  452. #define TWILIGHT              (-6.0*CDR)       /* civil twilight limit  [rad] */
  453. #define VISPHSLIMIT           (120.0*CDR)      /* sun phase angle limit [rad] */
  454. #define VISELELIMIT           (15.0*CDR)       /* visib elevation limit [rad] */
  455.  
  456. #define VLOWELEV              (-15.0*CDR)      /* low elevation level 1 [rad] */
  457. #define LOWELEV               (-2.0*CDR)       /* low elevation level 2 [rad] */
  458. #define MAXELELIMIT           (40.0*CDR)       /* good pass elev limit  [rad] */
  459.  
  460. #define TRACKLIMIT1           (-3.0*CDR)       /* antenna/radio track limit 1 */
  461. #define TRACKLIMIT2           (-1.0*CDR)       /* antenna/radio track limit 2 */
  462.  
  463. #define MAXAZIRATE            (5.0*CDR)        /* maximum azimuth rate [rad]  */
  464. #define MAXELERATE            (5.0*CDR)        /* maximum elevation rate [rad]*/
  465.  
  466. /******************************************************************************/
  467. /*                                                                            */
  468. /* control flags and parameters for geosynchronous satellites                 */
  469. /*                                                                            */
  470. /******************************************************************************/
  471.  
  472. #define GEOSYNC               1
  473. #define GEOSTAT               2
  474.  
  475. #define GEOSYNCMOT            0.05             /* maximum deviation in mean   */
  476.                                                /* motion from 1 rev/d for     */
  477.                                                /* geosynchronous satellites   */
  478.  
  479. #define GEOSTATINC            (10.0*CDR)       /* maximum inclination [deg]   */
  480.                                                /* for geostationary sats      */
  481.  
  482. #define MAXDAYS               2.0              /* limit for rise time search  */
  483.                                                /* for non-geosynchonous sats  */
  484.  
  485. #define MAXDAYSSYNC           3.0              /* limit for rise time search  */
  486.                                                /* for geosynchonous sats [d]  */
  487.  
  488. /******************************************************************************/
  489. /*                                                                            */
  490. /* event time parameters                                                      */
  491. /*                                                                            */
  492. /******************************************************************************/
  493.  
  494. #define HALFMIN               (0.5/MPD)        /* half a minute [d]           */
  495. #define ONEMIN                (1.0/MPD)        /* one minute [d]              */
  496. #define THREEMIN              (3.0/MPD)        /* three minutes [d]           */
  497. #define NINEMIN               (9.0/MPD)        /* nine minutes [d]            */
  498. #define TENMIN                (10.0/MPD)       /* ten minutes [d]             */
  499.  
  500. #define SUNUPDATEINT          (15.0/MPD)       /* update interval Sun [d]     */
  501. #define PRECUPDATEINT         (120.0/MPD)      /* update interval precession  */
  502. #define NUTEUPDATEINT         (120.0/MPD)      /* update interval nutation    */
  503.  
  504. #define FASTUPDATEINT         5                /* display update interval [s] */
  505.                                                /* xterm single and multisat   */
  506.  
  507. #define MEDUPDATEINT          5                /* display update interval [s] */
  508.                                                /* non-xterm single satellite  */
  509.  
  510. #define SLOWUPDATEINT         5                /* display update interval [s] */
  511.                                                /* non-xterm multisat          */
  512.  
  513. #define SLEEPTIME             50               /* sleep time [ms]             */
  514.  
  515. #ifdef ISI
  516. #define TRACKTIMEAHEAD        10               /* ISI track time offset [s]   */
  517. #define TRACKINT              1                /* ISI track time interval [s] */
  518. #else
  519. #define TRACKTIMEAHEAD        0                /* USER track time offset [s]  */
  520. #define TRACKINT              1                /* USER track time interval [s]*/
  521. #endif
  522.  
  523. /******************************************************************************/
  524. /*                                                                            */
  525. /* macros for handling the system timer function                              */
  526. /*                                                                            */
  527. /******************************************************************************/
  528.  
  529. #ifdef SVR4
  530. #define HOLDSIG       sighold(SIGALRM)             /* block ALRM signal       */
  531. #define RELEASESIG    sigrelse(SIGALRM)            /* release ALRM signal     */
  532. #define PAUSESIG      sigpause(SIGALRM)            /* sleep until ALRM signal */
  533. #else
  534. #define HOLDSIG       sigblock(sigmask(SIGALRM))
  535. #define RELEASESIG    sigblock(0)
  536. #define PAUSESIG      sigpause(0)
  537. #endif
  538.  
  539. /******************************************************************************/
  540. /*                                                                            */
  541. /* I/O control parameters                                                     */
  542. /*                                                                            */
  543. /******************************************************************************/
  544.  
  545. #define STDIN_FILENO          0                /* used in checkKeyboard()     */
  546.  
  547. #define SATCODE               998L             /* control flag to enable ISI  */
  548.                                                /* real-time system for sats   */
  549.  
  550. /******************************************************************************/
  551. /*                                                                            */
  552. /* X window parameters                                                        */
  553. /*                                                                            */
  554. /******************************************************************************/
  555.  
  556. #define GRIDSTEPX     (double) 30.0            /* grid step longitude [deg]   */
  557. #define NGRIDX        (int) 5                  /* number of grid lines left   */
  558.                                                /* and right of zero meridian  */
  559.  
  560. #define GRIDSTEPY     (double) 30.0            /* grid step latitude [deg]    */
  561. #define NGRIDY        (int) 2                  /* number of grid lines        */
  562.                                                /* above and below equator     */
  563.  
  564. #define GNDSPOT       (unsigned int) 3         /* half the size of the square */
  565. #define GNDSPOTX      (unsigned int) 2         /* half the size of the square */
  566. #define SATSPOT       (unsigned int) 2         /* half the size of the square */
  567. #define TRKSPOT       (unsigned int) 3         /* half the size of the square */
  568. #define CTYSPOT       (unsigned int) 1         /* half the size of the square */
  569.  
  570. #define NSEGS         (int) 120                /* number of segments per rev  */
  571. #define NREVS         (int) 3                  /* number of revs              */
  572. #define NSEGSGT       (int) (NSEGS*NREVS + 1)  /* (for ground track)          */
  573.  
  574. #define NSEGSVC       (int) 180                /* visib circle segments       */
  575. #define LCNUM         99993
  576.  
  577. #define NMIRPOINTS    420                      /* max data points in Mir icon */
  578. #define NSTSPOINTS    210                      /* max data points in STS icon */
  579.  
  580. #define LARGE         1                        /* map size flag               */
  581. #define MEDIUM        2                        /* map size flag               */
  582. #define SMALL         3                        /* map size flag               */
  583.  
  584. #define DHLIMIT       1.0                      /* differential height [km]    */
  585.  
  586. #define KSCLAT        28.608001*CDR            /* KSC latitude  [rad]         */
  587. #define KSCLONG       80.604*CDR               /* KSC longitude [rad]         */
  588. #define KSCALT        0.0                      /* KSC altitude  [m]           */
  589.  
  590. /******************************************************************************/
  591. /*                                                                            */
  592. /* End of include file sattrack.h                                             */
  593. /*                                                                            */
  594. /******************************************************************************/
  595.